#!/bin/sh

###################################################################
#
#  This script is for gather some inforamtion to troubleshoot 
#  a customer case (case number: 25855)
#  
# ################################################################# 

echo "Begin...."
echo `uname -a`
HALDPID="/var/run/haldaemon.pid"
HALDLCK="/var/lock/subsys/haldaemon"

/etc/init.d/haldaemon status

ls -l /var/run/

if [ -f $HALDPID ]
then
	echo "Found $HALDPID"
	cat $HALDPID
else
	echo "Not found $HALDPID"
fi

ls -l $HALDLCK
ps -ef | grep hald

sh -x /etc/init.d/haldaemon stop
ls -l $HALDLCK
if [ -f $HALDPID ]
then
	echo "Found $HALDPID after shutdown haldaemon, remove it"
	rm -f $HALDPID
	rm -f $HALDLCK
fi

sh -x /etc/init.d/haldaemon start

if [ -f $HALDPID ]
then
	echo "Found $HALDPID after start haldaemon"
	cat $HALDPID
else
	echo "Not found $HALDPID"
fi

ls -l $HALDLCK

